import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// legacy需要执行安装
// 1、npm install @vitejs/plugin-legacy --save-dev
// 2、npm install terser --save-dev
import legacy from '@vitejs/plugin-legacy';

// https://vitejs.dev/config/
export default defineConfig({
  base:"./", // 默认/配置文件的根目录为相对路径
  plugins: [
    vue(),
    legacy({
      targets: ['defaults', 'not IE 11'],
      additionalLegacyPolyfills: ['regenerator-runtime/runtime']
    }),
  ],
})
